package com.bienvenue.main.adapter;

import android.os.Parcelable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import java.util.List;

/**
 * @ProjectName: Bienvenue
 * @Package: com.bienvenue.main.adapter
 * @ClassName: HomeFragmentPagerAdapter
 * @Description: java类作用描述
 * @Author: liys
 * @CreateDate: 2020/9/7 11:20
 * @UpdateUser: Mr.Chen
 * @UpdateDate: 2020/9/7 11:20
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */


public class HomeFragmentPagerAdapter extends FragmentStatePagerAdapter {

    private List<Fragment> mFragments;

    public HomeFragmentPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        mFragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments != null ? mFragments.size() : 0;
    }

    @Override
    public Parcelable saveState() {
        return null;
    }
}

